﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Library/Site.master" AutoEventWireup="false" CodeFile="Perfiles.aspx.vb" Inherits="Administracion_Perfiles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<h1>Perfiles</h1>
    
    <table>
<tr>
<th colspan = "2">
Crear nuevo perfil
</th>
</tr>
<tr>
<td>
Nombre del perfil
</td>
<td>
    <asp:TextBox ID="txtPerfil" runat="server" ReadOnly="false" MaxLength = "100"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Obligatorio"  class="error" ControlToValidate ="txtPerfil"  ></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td colspan = "2" class ="botones" >
    <asp:Button ID="btnGuardar" runat="server" Text="Guardar" CssClass= "boton" />
    <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" CausesValidation = "false"  CssClass= "boton"/>
</td>
</tr>
</table>    
    <asp:CustomValidator ID="cutval" runat="server" ErrorMessage="Se ha eliminado" CssClass = "error"></asp:CustomValidator>
    <h2>Lista de perfiles</h2> 
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames = "CodPerfil">
        <Columns>
            <asp:TemplateField AccessibleHeaderText="CodPerfil" HeaderText="Cod">
                <EditItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("codPerfil") %>'></asp:Label>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("codPerfil") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField AccessibleHeaderText="Perfil" HeaderText="Perfil">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("perfil") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("perfil") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField  CausesValidation="false" ShowEditButton="True" ShowDeleteButton = "true " 
                CancelText="Cancelar" DeleteText="Eliminar" EditText="Editar" 
                InsertText="Insertar" SelectText="Seleccionar" UpdateText="Guardar"/>
        </Columns>
    </asp:GridView>

   
</asp:Content>


